This release contains serveral significant new features and improvements, as well as a host of bug fixes. See the ChangeLog further below for a complete listing of the nearly 60 changes in this release.
- Triggers may now have JobDataMaps associated with them. This can be useful in the case where you have a Job that is stored in the scheduler for regular/repeated use by multiple Triggers, yet with each independent triggering, you want to supply the Job with different data inputs. The JobDataMap that is now found on the JobExecutionContext (via the getMergedJobDataMap()) during Job execution serves as a convenience. It is a merge of the JobDataMap found on the JobDetail and the one found on the Trigger, with the value in the latter overriding any same-named values in the former.
- New Trigger Type: NthIncludedDayTrigger. This is a trigger which fires on the Nth day of every month or year that is not excluded by the associated calendar. See it's JavaDoc for full features and behavior description.
- User Defined JobFactories. Users can now define their own mechanisms for instantiating Jobs. This feature will be useful to those who would like to take advantage of IoC container features, such as dependency injection. See new method: Scheduler.setJobFactory(org.quartz.spi.JobFactory).
- PropertySettingJobFactory. A JobFactory type that will reflectively set properties on a Job from values in the JobDataMap after the job is instantiated.
- Direct support for more databases: Derby, DB2 version 8.
- Quartz is now distributed under the Apache 2.0 license.
- There is no longer a limit on the number of threads that a SimpleThreadPool can have.
- Various improvements and new features in JobInitializationPlugin and related jobs xml format.
- It is no longer necessary to specify a group name on a Job or Trigger, if left unset or set to null, Scheduler.DEFAULT_GROUP will be used.
- org.quartz.helpers.TriggerUtils class moved up to main package, so it is now org.quartz.TriggerUtils. The old version of the class was left behind but deprecated.
- Various small API cleanups involving deprecations of old methods.
Necessary Code Changes
Version |
Description |
Old Code |
New Code |
1.4.x |
no changes necessary |
|
|
Necessary Database Changes (if using JDBC-JobStore)
Version |
Description |
update command(s) |
1.4.x |
Add Blob column for JobDataMap to QRTZ_TRIGGERS table. This example update SQL is for Oracle. Make sure you use the appropriate data type for your database, which can be found in the tables_xxx.sql file for your db. You should leave the value of this new column NULL for existing rows. |
alter table QRTZ_TRIGGERS add JOB_DATA BLOB |
|